
package com.gitee.sop.layui.adminserver.module.background.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gitee.sop.layui.adminserver.module.background.admin.entity.SysUserFunctionRoleRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: admin
 * @date: 2020-04-24
 * @version: 1.0.0
 */
public interface SysUserFunctionRoleRelationMapper extends BaseMapper<SysUserFunctionRoleRelation> {
    /**
     * 删除指定用户uuid的所有数据
     *
     * @param userUuid 用户uuid标识
     */
    void deleteByUserUuid(@Param(value = "userUuid") String userUuid);

    /**
     * 查询指定用户uuid的所有功能角色的id
     *
     * @param userUuid 用户uuid标识
     * @return
     */
    List<Integer> selectFunctionRoleIdByUserUuid(@Param(value = "userUuid") String userUuid);

    /**
     * 查询指定功能角色的条目数
     *
     * @param functionRoleIdList 功能角色id列表
     * @return
     */
    int countInFunctionRoleIdList(@Param("functionRoleIdList") List<Integer> functionRoleIdList);
}
